<?php
/**
 * Created by PhpStorm.
 * User: chengchaogui
 * Date: 2017/9/24
 * Time: 20:03
 */

namespace App\Framework\Enum;


class BroadcastTypeEnum
{
    //私人消息
    const PERSONAL = 0;
    //系统通知
    const SYSTEM_NOTICE = 1;
    //系统广播
    const SYSTEM_BROADCAST = 2;

    public static $dataMap = [
        self::PERSONAL => '私人消息',
        self::SYSTEM_NOTICE => '系统通知',
        self::SYSTEM_BROADCAST => '系统广播'
    ];

    public static function getName($key)
    {
        if (array_key_exists($key, self::$dataMap)) {
            return self::$dataMap[$key];
        }

        return '';
    }
}